import request from '@/config/axios'

export interface WhiteAuditVO {
  id: number
  no: string
  numberPoolId: number
  name: string
  speechContent: string
  status: number
}

// 查询报白审批列表
export const getWhiteAuditPage = async (params) => {
  return await request.get({ url: `/call/white-audit/page`, params })
}

// 查询报白审批详情
export const getWhiteAudit = async (id: number) => {
  return await request.get({ url: `/call/white-audit/get?id=` + id })
}

// 新增报白审批
export const createWhiteAudit = async (data: WhiteAuditVO) => {
  return await request.post({ url: `/call/white-audit/create`, data })
}

// 修改报白审批
export const updateWhiteAudit = async (data: WhiteAuditVO) => {
  return await request.post({ url: `/call/white-audit/update`, data })
}

// 删除报白审批
export const deleteWhiteAudit = async (id: number) => {
  return await request.delete({ url: `/call/white-audit/delete?id=` + id })
}

// 导出报白审批 Excel
export const exportWhiteAudit = async (params) => {
  return await request.download({ url: `/call/white-audit/export-excel`, params })
}

// 更新坐席
export const updateAgent = async (data) => {
  return await request.post({ url: `/call/white-audit/update-agent`, data })
}
// 查看坐席
export const getAgentList = async (id) => {
  return await request.get({ url: `/call/white-audit/get-agent?auditId=` + id })
}

// 提交审批
export const submitReview = async (data) => {
  return await request.post({ url: `/call/white-audit/submit`, data })
}
// 提交坐席审批
export const submitAgent = async (data) => {
  return await request.post({ url: `/call/white-audit/submit-agent`, data })
}
